<?php


namespace app\common;


use thans\jwt\facade\JWTAuth;
use think\Model;

class BaseModel extends Model {

    protected $user_id  = 0;

    protected function getUserId(){
        try{
            $auth_info = JWTAuth::auth();
            $this->user_id = $auth_info['user_id']->getValue();


        }catch (\Exception $e){
        }
        return $this->user_id;
    }
}